﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Data.OleDb;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

namespace skvote
{
    public partial class conn : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }
        public OleDbConnection CreateConnection()
        {
            OleDbConnection conn = null;
            try
            {
                conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("vote.mdb"));
                conn.Open();
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }
            finally
            {
                
            }
            return conn;
        }
    }
}
